package pt.agap2.relationchat.utils;

import java.util.UUID;

public class MockServerCommunication implements IServerCommunication{

	@Override
	public AuthenticationObject logIn(String app_token, String user, String pin) {
		AuthenticationObject obj = new AuthenticationObject();
		obj.status="Authorized";
		obj.userToken=UUID.randomUUID().toString();
		return obj;
	}

	@Override
	public UserData[] getUsers(String app_token, String userToken) {
		UserData u1 = new UserData();
		UserData u2 = new UserData();
		
		u1.userId = UUID.randomUUID().toString();
		u2.userId = UUID.randomUUID().toString();
		
		u1.userName="Anna";
		u2.userName="Bob";
		
		u1.messageCount=1;
		u2.messageCount=2;
		
		return new UserData[]{u1,u2};
	}

	@Override
	public Message[] getMessages(String app_token, String userToken,
			String personId) {

		Message m1 = new Message();
		m1.timeStamp = System.currentTimeMillis();
		m1.message = "MOCK MESSAGE at "+m1.timeStamp;
		
		return new Message[]{m1};
	}

	@Override
	public void sendMessage(String app_token, String userToken,
			String personId, String message) {
		return;
	}

}
